#x_equal_y = 1 if x equal y

copy x to i;
copy y to j;

incr x_equal_y;
incr x_equal_y;

while y not 0 do;
    decr x;
    decr y;
end;
while x not 0 do;
    decr x_equal_y;
    clear x;
end;

copy i to x;
copy j to y;

while i not 0 do;
    decr j;
    decr i;
end;
while j not 0 do;
    decr x_equal_y;
    clear j;
end;

decr x_equal_y;